package cn.cvs.service.pet;

import cn.cvs.pojo.Apply;
import cn.cvs.pojo.Pet;
import cn.cvs.pojo.Supplier;
import cn.cvs.pojo.Type;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PetService {

	/**
	 * 增加供货商
	 * @param apply
	 * @return
	 */
	public boolean add(Apply apply) throws Exception;



	/**
	 * 通过供应商名称、编码获取供应商列表-模糊查询

	 * @param currentPageNo
	 * @param pageSize
	 * @return
	 */
	public List<Pet> getList(int currentPageNo, int pageSize) throws Exception;


	/**
	 * 通过条件查询-供应商表记录数

	 * @return
	 * @throws Exception
	 */
	public int getCount() throws Exception;

	/**
	 * 根据id查询
	 * @param id
	 * @return
	 */
	public Supplier getById(Integer id) throws Exception;


	/**
	 * 修改供货商
	 * @param apply
	 * @return
	 */
	public int update(Apply apply) throws Exception;

	/**
	 * 根据id删除供货商信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean deleteById(Integer id) throws Exception;

	Pet getPetById(Integer id) throws Exception;


	List<Pet> selectAllList(Integer typeId,  Integer pageIndex, Integer pageSize);

	int count(Integer typeId);

	int addPet(Pet pet);

	int updatePetById(Pet pet);

	int deletePetById(@Param("id")Integer id);

	Pet selectPetById(Integer id);

	List<Type> list();
}
